<?php

namespace app\admin\model;

use think\Model;

class Tag extends Model
{
    protected $table = "tags";

    //标签属于分类
    public function category()
    {
       return $this->belongsTo('Category');
    }

    // 定义时间戳字段名
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';
}